from skimage import data, filters
from matplotlib import pyplot as plt 
# img为原始图像
img = data.camera()
# laplace
img_laplace = filters.laplace(img, ksize = 3, mask = None)
img_enhance = img + img_laplace
# 显示图像
plt.rcParams['font.sans-serif'] = ['SimHei'] 
plt.rcParams['axes.unicode_minus'] = False
plt.subplot(1, 3, 1)
plt.axis('off')
plt.imshow(img, cmap = 'gray')
plt.title('原图像')
plt.subplot(1, 3, 2)
plt.axis('off')
plt.imshow(img_laplace, cmap = 'gray')
plt.title('laplace')
plt.subplot(1, 3, 3)
plt.axis('off')
plt.imshow(img_enhance, cmap = 'gray')
plt.title('锐化增强')
plt.savefig('laplace.tif')
